package com.kd.eb.controller;

import com.kd.eb.model.EbProductCategory;
import com.kd.eb.service.ProductCategoryService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping("productcategory")
public class ProductCategoryController {
    @Resource
    private ProductCategoryService productCategoryService;

    //
    @RequestMapping("/list")
    public String list(Model model,int pid){
        System.out.println("进入Productdetail的controller方法...pid"+pid);
        EbProductCategory productCategorylist = productCategoryService.list(pid);
        model.addAttribute("productCategorylist",productCategorylist);
        return "product-list";
    }
}
